package cn.itcast.tanhua.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
/**
 * user表的sex字段对应的枚举类
 * @author 郭文亮
 * @since 2021/11/22 19:04
 */
public enum SexEnum implements IEnum<Integer>{
    /**
     * 1-》男
     * 2-》女
     * 3-》未知（默认）
     */
    MAN(1,"男"),
    WOMAN(2,"女"),
    UNKNOWN(3,"未知");

    private int value;
    private String desc;

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.desc;
    }
}